package com.demo.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.demo.anotion.UserDataPermission;
import com.demo.entity.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

// UserMapper.java
public interface UserMapper extends BaseMapper<User>, DataPermissionMapper<User> {

    @UserDataPermission
    List<User> selectList(@Param(Constants.WRAPPER) Wrapper<User> queryWrapper);

    @UserDataPermission
    <E extends IPage<User>> E selectPage(E page, @Param(Constants.WRAPPER) Wrapper<User> queryWrapper);
}